package com.gem.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * @author 刘聪
 * Created  on 2020/12/15
 */
@Data
@TableName(value = "sb_user")//指定表名
public class User implements Serializable {
    private static final long serialVersionUID = 8114259107831138075L;

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String username;
    /**
     * 昵称，可有可无
     */
    private String nickname;
    private String password;
    private String phone;
    private String email;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;
    /**
     * 性别(0:男 1：女)
     */
    private GenderEnum gender;
    @TableField(exist = false)
    private Integer genderCode;
    private Integer role;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableLogic
    private Integer deleted;



}
